<div id="container">
<div id="sidebar">
	<div class="logo"><a href="<?=site_url()?>"><img src="<?=base_url()?>resources/imgs/logo.png" alt="" width="200"></a><p class="sub-title">Traiteur Chinois</p></div>
		<div class="submenu" >
<h3><a href="<?=site_url('account')?>">Vos Commandes</a></h3><br>
<h3><a href="<?=site_url('account/address')?>">Adresses Livraisons</a></h3><br>
<h3><a href="<?=site_url('account/update_password')?>">Mot de Passe</a></h3><br>
<hr>
</div>
		<h3>
			<img src="<?=base_url()?>/resources/imgs/cart.png" alt="Panier" title="Panier" height="16"> Panier
			<?=$this->cart->total_items()?>
			|
			<?=number_format($this->cart->total(),2,'.','')?>
			€
		</h3>
		
		<?php $i = 1; ?>
		<?php if(!$this->cart->contents()){?>
		<p>
			Panier Vide
		</p>
		<?php }?>

		<?php foreach ($this->cart->contents() as $items): ?>
		<div class="order_item">
			<span class="product_item"> 
			<?=$items['product_num']?>.<?=nbs(0)?> <?php echo $items['name']; ?>
			</span> <span class="qty"><?php if($items['options_price'] !=NULL && $items['options_price'] != 0){?> <?=number_format($items['price']+$items['options_price'],2,'.','')?> € (<?=$items['qty']?>)<?php }else{?> <?=number_format($items['price'],2,'.','')?> € (<?=$items['qty']?>)<?php }?></span>
			<br><span class="option"><?php if($this->cart->has_options($items['rowid'])==TRUE):?><label><small>OPTIONs:	</small></label><?php foreach ($this->cart->product_options($items['rowid']) as $option): ?><?=nbs(1)?>

					<small><?php echo $option['option_name']; ?> <?php if( $option['price'] !=NULL ){ echo ': '.$option['price'].' €';} ?></small><?=nbs(1)?>

					<?php endforeach; ?><?php endif; ?></span>
			<div class="clear"></div>

		</div>
		<?php $i++; ?>
		<?php endforeach; ?>
		<div class="clear"></div>
		<br><br>
		<input class="btn_panier" type="button" value="MON PANIER" onclick="document.location.href='<?=site_url('cart')?>'">
		<hr>
<?php if($this->discount || $this->discount_delivery){?>
		<h3>Promo!</h3>
		<?php if($this->discount){?>
	<div class="promo">
	A partir du <?=date('d M. Y',strtotime($this->discount[0]->discount_start))?> jusqu'au <?=date('d M. Y',strtotime($this->discount[0]->discount_end))?>, Une Réduction de <?=$this->discount[0]->discount_val*100?>% pour toutes les commandes paiement par espèces !!!
	</div>
	<?php }?>
	<?php if($this->discount_delivery){?>
	<div class="promo">
	A partir du <?=date('d M. Y',strtotime($this->discount_delivery[0]->discount_start))?> jusqu'au <?=date('d M. Y',strtotime($this->discount_delivery[0]->discount_end))?>,  Pour les commandes de livraison, Une Réduction de <?=$this->discount_delivery[0]->discount_val*100?>% 
	pour les communes: <br>
	<?php foreach ($this->discount_delivery[0]->community as $c):?>
	<?=$c->code?> <?=$c->name?> / 
	<?php endforeach;?>
	!!!</div>
	<?php }?>
	<?php }?>
	

	</div>
	<div class="rightbar">
<div class="ctn_account">


<div class="update_password">
<h3>Mot de Passe</h3>
<p class="error"><?=isset($message) ? $message :'' ?></p>
<form action="<?=site_url('account/update_password')?>" name="update_password" method="post">
<label class="pwd">Nouveau Mot de Passe:</label><input type="password" value="" name="password" />
<label class="pwd">Confirmer Mot de Passe:</label><input type="password" value="" name="passconf" />
<div><input type="button" value="effectuer" onclick="document.update_password.submit();"></div>
</form>
</div>
<div class="clear"></div>
</div>
</div>
<div class="clear"></div>
</div>
